<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/message.css"/>
    <link rel="stylesheet" href="/css/like.css"/>
    <link rel="stylesheet" href="../js/plugins/jquery-confirm/css/jquery-confirm.css">
    <script src="../js/plugins/jquery-confirm/js/jquery-confirm.js"></script>
    <script src="../js/plugins/jrender/jrender.min.js"></script>
    <script src="../js/plugins/dialog2/dialog.min.js"></script>
    <link rel="stylesheet" href="../js/plugins/dialog2/dialog.css">


</head>
<script>
    $(function () {
        var users = sessionStorage.getItem("user");
        var user = JSON.parse(users);
        function query() {
            $.get("/users/"+user.id+"/travels/systemMsgs", {pageSize: 0}, function (data) {
                console.log(data);
                $(".detail").renderValues(data, {
                    'setHref': function (item, value) {

                        $(item).attr("href", $(item).attr("href") + value);
                    }
                });
                currentPage += 1;
                totalPage = data.pages;
            })
        }

        query();
        var currentPage;
        var dataList = [];
        var totalPage = 1;
        $(window).scroll(function () {
            if ($(window).height() + $(window).scrollTop() >= $(document).height()) {
                if (currentPage <= totalPage) {
                    query();
                } else {
                    $(document).dialog({
                        type: 'notice',
                        infoText: '到底了',
                        autoClose: 1500,
                        position: 'bottom'
                    })
                }
            }
        });
    })
</script>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <span>系统通知查看</span>
        </div>
        <div class="col"></div>
    </div>
</div>
<div class="container">
    <h3 style="color: aquamarine">通知列表:</h3>
    <div class="row detail">
        <div class="col" render-loop="list">
            <div>
                <span style="color: crimson">系统管理员</span>在
                <p/>
                <span render-html="list.msgDate" style="color: chartreuse"></span>
                向您提醒
                <p/>
                <div class="focus">
                    <i class="fa fa-bell">
                        <span render-html="list.content" style="color: crimson"></span>
                    </i>
                </div>
                <a href="../travelContent.html?id=" render-fun="setHref" render-key="list.travel.id">
                    <img render-src="list.travel.coverUrl" class="rounded-circle head-img"/>
                    <span render-html="list.travel.title" style="color: blueviolet"></span>
                </a>
                <hr/>
            </div>
        </div>
    </div>
</body>
</html>